package singleLinkedListExercise;

public class TestMySingleLinkedList {
    public static void main(String[] args) {
        IMySingleLinkedList list = new MySingleLinkedList();
        list.addFirst(1);
        list.addFirst(1);
        list.addFirst(1);
        list.addFirst(1);
        list.addFirst(1);
        list.addFirst(1);
        list.addLast(100);
        list.display();
        list.removeAllKey(100);
        list.display();
    }
    public static void main1(String[] args) {
        IMySingleLinkedList list = new MySingleLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.addFirst(3);
        list.addFirst(3);
        list.addLast(100);
        list.addLast(100);
        list.addLast(200);
        list.addIndex(0,500);
        System.out.println(list.size());
        System.out.println(list.contains(100));
        System.out.println(list.contains(99));
       list.remove(500);
//        list.remove(500);
//        list.remove(200);//3->3->3->2->1->100->100->200
        list.removeAllKey(3);
        list.removeAllKey(100);
        list.display();
        list.clear();
    }
}
